package com.xiaohong.goods.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "Sku")
public class Sku implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "商品id",accessMode = READ_ONLY)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
	private String id;//商品id

    @Schema(description = "SKU名称")
    @TableField("name")
	private String name;//SKU名称

    @Schema(description = "价格（分）")
    @TableField("price")
	private Integer price;//价格（分）

    @Schema(description = "库存数量")
    @TableField("num")
	private Integer num;//库存数量

    @Schema(description = "商品图片列表")
    @TableField("images")
	private String images;//商品图片列表

	@Schema(description = "商品图片列表",accessMode = READ_ONLY)
	@TableField(exist = false)
	private List<String> imageList;//商品图片列表

    @Schema(description = "SPUID")
    @TableField("spu_id")
	private String spuId;//SPUID

    @Schema(description = "类目ID")
    @TableField("category_id")
	private Integer categoryId;//类目ID

    @Schema(description = "类目名称")
    @TableField("category_name")
	private String categoryName;//类目名称

    @Schema(description = "品牌ID")
    @TableField("brand_id")
	private Integer brandId;//品牌ID

	@Schema(description = "品牌中文名称")
	@TableField("brand_chinese_name")
	private String brandChineseName;//品牌中文名称

	@Schema(description = "品牌英文名称")
	@TableField("brand_english_name")
	private String brandEnglishName;//品牌英文名称

    @Schema(description = "规格")
    @TableField("spec")
	private String spec;//规格

	@Schema(description = "规格集合",accessMode = READ_ONLY)
	@TableField(exist = false)
	private List specList; // 规格集合

    @Schema(description = "销量")
    @TableField("sale_num")
	private Integer saleNum;//销量

    @Schema(description = "评论数")
    @TableField("comment_num")
	private Integer commentNum;//评论数

    @Schema(description = "商品状态 1-正常，2-下架，3-删除")
    @TableField("status")
	private Integer status;//商品状态 1-正常，2-下架，3-删除

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private Integer deleted;//逻辑删除标志

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private Date gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private Date gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Integer version;//乐观锁

	public String getBrandChineseName() {
		return brandChineseName;
	}

	public void setBrandChineseName(String brandChineseName) {
		this.brandChineseName = brandChineseName;
	}

	public String getBrandEnglishName() {
		return brandEnglishName;
	}

	public void setBrandEnglishName(String brandEnglishName) {
		this.brandEnglishName = brandEnglishName;
	}

	public List<String> getImageList() {
		return imageList;
	}

	public void setImageList(List<String> imageList) {
		this.imageList = imageList;
	}

	public List getSpecList() {
		return specList;
	}

	public void setSpecList(List specList) {
		this.specList = specList;
	}

	//get方法
	public String getId() {
		return id;
	}

	//set方法
	public void setId(String id) {
		this.id = id;
	}
	//get方法
	public String getName() {
		return name;
	}

	//set方法
	public void setName(String name) {
		this.name = name;
	}
	//get方法
	public Integer getPrice() {
		return price;
	}

	//set方法
	public void setPrice(Integer price) {
		this.price = price;
	}
	//get方法
	public Integer getNum() {
		return num;
	}

	//set方法
	public void setNum(Integer num) {
		this.num = num;
	}
	//get方法
	public String getImages() {
		return images;
	}

	//set方法
	public void setImages(String images) {
		this.images = images;
	}
	//get方法
	public String getSpuId() {
		return spuId;
	}

	//set方法
	public void setSpuId(String spuId) {
		this.spuId = spuId;
	}
	//get方法
	public Integer getCategoryId() {
		return categoryId;
	}

	//set方法
	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}
	//get方法
	public String getCategoryName() {
		return categoryName;
	}

	//set方法
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
	//get方法
	public Integer getBrandId() {
		return brandId;
	}

	//set方法
	public void setBrandId(Integer brandId) {
		this.brandId = brandId;
	}
	//get方法
	public String getSpec() {
		return spec;
	}

	//set方法
	public void setSpec(String spec) {
		this.spec = spec;
	}
	//get方法
	public Integer getSaleNum() {
		return saleNum;
	}

	//set方法
	public void setSaleNum(Integer saleNum) {
		this.saleNum = saleNum;
	}
	//get方法
	public Integer getCommentNum() {
		return commentNum;
	}

	//set方法
	public void setCommentNum(Integer commentNum) {
		this.commentNum = commentNum;
	}
	//get方法
	public Integer getStatus() {
		return status;
	}

	//set方法
	public void setStatus(Integer status) {
		this.status = status;
	}
	//get方法
	public Integer getDeleted() {
		return deleted;
	}

	//set方法
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}
	//get方法
	public Date getGmtCreate() {
		return gmtCreate;
	}

	//set方法
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	//get方法
	public Date getGmtModified() {
		return gmtModified;
	}

	//set方法
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	//get方法
	public Integer getVersion() {
		return version;
	}

	//set方法
	public void setVersion(Integer version) {
		this.version = version;
	}


	public static void main(String[] args) {
		HashMap<Object, Object> map = new HashMap<>();
		List list = new ArrayList();
		list.add(1);
		list.add(2);
		list.add(3);
		map.put("list",list);
		map.put("test","a");
		map.put("test","b");
		map.put("test","c");
		int a = 1+2;
		System.out.println(map);
	}

}

